import random

gold = 1000
str1 = ""
while str1 != "exit" and gold >= 100:
    str1 = input("大or小：")
    a = random.randint(1, 6)
    b = random.randint(1, 6)
    c = random.randint(1, 6)
    d = a + b + c
    if 3 < d < 11:
        e = "小"
    else:
        e = "大"
    if str1 == e:
        gold += 100
        print("win")
    elif str1 == "exit":
        print("退出")
        break
    else:
        gold -= 100
        print("loss")
    print(f"你还剩{gold}金币")
else:
    print("金币不足")
